const {defineConfig} = require('@vue/cli-service')
module.exports = defineConfig({
    transpileDependencies: true,
    lintOnSave: false,
    devServer: {
        client: {
            overlay: false
        },
        port:8088,
        https: false,//是否开启协议名,如果开启会发出警告
        historyApiFallback: true,
        allowedHosts: "all",
        // 跨域代理配置
        proxy: {
            '/api': {
                target: 'http://localhost:5000', // 后端接口的地址
                changeOrigin: true,             // 是否修改请求头中的 Origin 字段
                pathRewrite: {
                    '^/api': '',                  // 重写路径，将 /api 替换为空
                },
            },
        },
    },
})
